/**
 * 日志配置
 * */

const log4j = require('log4js');
const path = require('path');

let config = {
  appenders: {
    fileHandler: {
      "type": "dateFile",
      "filename": path.join("./log", "system"),
      "pattern": "-yyyy-MM-dd.log",
      "alwaysIncludePattern": true
    }
  },
  categories: {
    default: {
      appenders: ["fileHandler"],
      level: "ALL"
    }
  }
};

log4j.configure(config);
let logger = log4j.getLogger("default");

module.exports = logger;